<!-- include tpl=usercp/head title=订单付款 -->
<form method="post" onsubmit="return $.order.payment(this)">
<input type="hidden" name="id" id="order-id" value="{$rs.id}" />
<input type="hidden" name="sn" id="order-sn" value="{$rs.sn}" />
<input type="hidden" name="passwd" id="order-passwd" value="{$rs.passwd}" />
<section class="container">
	<div class="m-4">
		<h3 class="m-4 text-center">订单 #{$rs.sn}</h3>
		<!-- include tpl=usercp/order-baseinfo -->
		<!-- if $integral -->
		<div class="card mt-2">
			<div class="card-header">
				积分抵扣
			</div>
			<table class="table mb-0">
			<thead>
			<tr>
				<th>说明</th>
				<th>可用</th>
				<th width="150px" class="text-center">支出</th>
			</tr>
			</thead>
			<!-- loop from=$integral key=$key value=$value id=$tmpid -->
			<tr>
				<td>您当前的 <span class="am-text-danger">{$value.title}</span> 有 <span class="text-danger">{$value.val}</span>{$value.unit}（100 {$value.unit}  = {$value.cash_ratio} 元）</td>
				<td>最多可抵现金<span class="red">{func price_format $value.price}</span></td>
				<td>
					<select class="form-select" name="integral_val[{$key}]" data-name="integral" data-key="{$key}">
					<!-- loop from=$value.list key=$k value=$v id=$idxx -->
					<option value="{$v.val}">{$v.title}</option>
					<!-- /loop -->
					</select>
				</td>
			</tr>
			<!-- /loop -->
			</table>
		</div>
		<!-- /if -->
		<!-- if $balance -->
		<div class="card mt-2">
			<div class="card-header">
				余额支付
			</div>
			<div class="card-body">
				<!-- loop from=$balance key=$key value=$value -->
				<div class="form-check">
					<label class="form-check-label mb-2">
				    	<input type="radio" class="form-check-input" name="payment" value="{$value.identifier}" data-price="{$price_val}" data-balance="{$value.price}" />
				    	您当前的{$value.title}有<span class="red">{$value.val}</span>{$value.unit}
				    	<!-- if $price_val > $value.price -->
						，您的{$value.title}不够，请 <a href="{url ctrl=payment id=$value.id/}" target="_blank"><b>在线充值</b></a>
						<!-- /if -->
					</label>
				</div>
				<!-- /loop -->
			</div>
		</div>
		<!-- /if -->
		<!-- loop from=$paylist key=$key value=$value id=$tmpid -->
		<div class="card mt-2">
			<div class="card-header">
				{$value.title}
			</div>
			<div class="card-body">
				<!-- loop from=$value.paylist key=$k value=$v id=$idxx -->
				<div class="form-check">
					<label class="form-check-label mb-2">
				    	<input type="radio" class="form-check-input" name="payment" value="{$v.id}"{if !$tmpid.index && !$idxx.index} checked{/if} />
				    	<!-- if $v.logo1 -->
				    	<img src="{$v.logo1}" style="width:40px;"  />
				    	<!-- /if -->
				    	{$v.title}
					</label>
				</div>
				<!-- /loop -->
			</div>
		</div>
		<!-- /loop -->
	</div>
</section>

<div class="submit-info">
	<div class="text-center">
		<input type="submit" value="{lang确认付款}" class="btn btn-lg btn-primary" id="save_button" />
		<input type="button" value="{lang关闭窗口}" onclick="window.close()" class="btn btn-lg btn-danger" id="save_button" />
	</div>
</div>
</form>

<!-- include tpl=usercp/foot -->